home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / linux_obuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-21  |  1.5 KB  |  56 lines

  1. /* linux_obuffer.h
  2.  
  3.    Output buffer for Linux written by
  4.    Louis P. Kruger (lpkruger@phoenix.princeton.edu)
  5.  
  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2 of the License, or
  9.    (at your option) any later version.
  10.  
  11.    This program is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  19.  
  20. #ifndef LINUX_OBUFFER_H
  21. #define LINUX_OBUFFER_H
  22.  
  23. #ifdef LINUX
  24.  
  25. #include "args.h"
  26. #include "obuffer.h"
  27.  
  28. class LinuxObuffer : public Obuffer
  29. {
  30.   int16  buffer[OBUFFERSIZE];
  31.   int16 *bufferp[MAXCHANNELS];
  32.   uint32 channels;
  33.   static int audio_fd;
  34.  
  35.   static int open_audio_device (void);
  36.  
  37. public:
  38.     LinuxObuffer (uint32 number_of_channels, MPEG_Args *maplay_args);
  39.        ~LinuxObuffer (void);
  40.  
  41.   void    append (uint32 channel, int16 value);
  42.   void    write_buffer (int dummy);
  43.  
  44. #ifdef SEEK_STOP
  45.   void clear_buffer(void);
  46.   void set_stop_flag(void);
  47. #endif // SEEK_STOP
  48.  
  49.  
  50.   static BOOL class_suitable (uint32 number_of_channels);
  51. };
  52.  
  53. #endif // LINUX
  54.  
  55. #endif // LINUX_OBUFFER_H
  56.